/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.smarttmt.smartmanager.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author nicolas
 */
@Entity
@Table(name = "ACTIVIDA")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Activida.findAll", query = "SELECT a FROM Activida a"),
    @NamedQuery(name = "Activida.findByActicodi", query = "SELECT a FROM Activida a WHERE a.acticodi = :acticodi"),
    @NamedQuery(name = "Activida.findByActidesc", query = "SELECT a FROM Activida a WHERE a.actidesc = :actidesc"),
    @NamedQuery(name = "Activida.findByActitiac", query = "SELECT a FROM Activida a WHERE a.actitiac = :actitiac"),
    @NamedQuery(name = "Activida.findByActitipo", query = "SELECT a FROM Activida a WHERE a.actitipo = :actitipo"),
    @NamedQuery(name = "Activida.findByActisecu", query = "SELECT a FROM Activida a WHERE a.actisecu = :actisecu"),
    @NamedQuery(name = "Activida.findByActiresp", query = "SELECT a FROM Activida a WHERE a.actiresp = :actiresp"),
    @NamedQuery(name = "Activida.findByActigere", query = "SELECT a FROM Activida a WHERE a.actigere = :actigere"),
    @NamedQuery(name = "Activida.findByActicore", query = "SELECT a FROM Activida a WHERE a.acticore = :acticore"),
    @NamedQuery(name = "Activida.findByActimapo", query = "SELECT a FROM Activida a WHERE a.actimapo = :actimapo"),
    @NamedQuery(name = "Activida.findByActisiac", query = "SELECT a FROM Activida a WHERE a.actisiac = :actisiac"),
    @NamedQuery(name = "Activida.findByActihoes", query = "SELECT a FROM Activida a WHERE a.actihoes = :actihoes"),
    @NamedQuery(name = "Activida.findByActirefe", query = "SELECT a FROM Activida a WHERE a.actirefe = :actirefe"),
    @NamedQuery(name = "Activida.findByActirsql", query = "SELECT a FROM Activida a WHERE a.actirsql = :actirsql"),
    @NamedQuery(name = "Activida.findByActiesac", query = "SELECT a FROM Activida a WHERE a.actiesac = :actiesac"),
    @NamedQuery(name = "Activida.findByActiesfi", query = "SELECT a FROM Activida a WHERE a.actiesfi = :actiesfi"),
    @NamedQuery(name = "Activida.findByActireas", query = "SELECT a FROM Activida a WHERE a.actireas = :actireas"),
    @NamedQuery(name = "Activida.findByActireop", query = "SELECT a FROM Activida a WHERE a.actireop = :actireop"),
    @NamedQuery(name = "Activida.findByActiplan", query = "SELECT a FROM Activida a WHERE a.actiplan = :actiplan"),
    @NamedQuery(name = "Activida.findByActideso", query = "SELECT a FROM Activida a WHERE a.actideso = :actideso"),
    @NamedQuery(name = "Activida.findByActicati", query = "SELECT a FROM Activida a WHERE a.acticati = :acticati"),
    @NamedQuery(name = "Activida.findByActigeia", query = "SELECT a FROM Activida a WHERE a.actigeia = :actigeia"),
    @NamedQuery(name = "Activida.findByActivweb", query = "SELECT a FROM Activida a WHERE a.activweb = :activweb"),
    @NamedQuery(name = "Activida.findByActienco", query = "SELECT a FROM Activida a WHERE a.actienco = :actienco")})
public class Activida implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "ACTICODI")
    private String acticodi;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "ACTIDESC")
    private String actidesc;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "ACTITIAC")
    private String actitiac;
    @Size(max = 1)
    @Column(name = "ACTITIPO")
    private String actitipo;
    @Column(name = "ACTISECU")
    private Short actisecu;
    @Size(max = 6)
    @Column(name = "ACTIRESP")
    private String actiresp;
    @Size(max = 1)
    @Column(name = "ACTIGERE")
    private String actigere;
    @Size(max = 1)
    @Column(name = "ACTICORE")
    private String acticore;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "ACTIMAPO")
    private BigDecimal actimapo;
    @Size(max = 4)
    @Column(name = "ACTISIAC")
    private String actisiac;
    @Column(name = "ACTIHOES")
    private BigDecimal actihoes;
    @Size(max = 1)
    @Column(name = "ACTIREFE")
    private String actirefe;
    @Size(max = 1)
    @Column(name = "ACTIRSQL")
    private String actirsql;
    @Size(max = 2)
    @Column(name = "ACTIESAC")
    private String actiesac;
    @Size(max = 2)
    @Column(name = "ACTIESFI")
    private String actiesfi;
    @Size(max = 1)
    @Column(name = "ACTIREAS")
    private String actireas;
    @Size(max = 1)
    @Column(name = "ACTIREOP")
    private String actireop;
    @Size(max = 100)
    @Column(name = "ACTIPLAN")
    private String actiplan;
    @Size(max = 1)
    @Column(name = "ACTIDESO")
    private String actideso;
    @Size(max = 1)
    @Column(name = "ACTICATI")
    private String acticati;
    @Size(max = 1)
    @Column(name = "ACTIGEIA")
    private String actigeia;
    @Column(name = "ACTIVWEB")
    private BigInteger activweb;
    @Size(max = 1)
    @Column(name = "ACTIENCO")
    private String actienco;
    @JoinColumn(name = "ACTIFORM", referencedColumnName = "FORMCODI")
    @ManyToOne(fetch = FetchType.LAZY)
    private Formula actiform;
    @JoinColumn(name = "ACTILICH", referencedColumnName = "ESCHCODI")
    @ManyToOne(fetch = FetchType.LAZY)
    private Estrcheq actilich;

    public Activida() {
    }

    public Activida(String acticodi) {
        this.acticodi = acticodi;
    }

    public Activida(String acticodi, String actidesc, String actitiac) {
        this.acticodi = acticodi;
        this.actidesc = actidesc;
        this.actitiac = actitiac;
    }

    public String getActicodi() {
        return acticodi;
    }

    public void setActicodi(String acticodi) {
        this.acticodi = acticodi;
    }

    public String getActidesc() {
        return actidesc;
    }

    public void setActidesc(String actidesc) {
        this.actidesc = actidesc;
    }

    public String getActitiac() {
        return actitiac;
    }

    public void setActitiac(String actitiac) {
        this.actitiac = actitiac;
    }

    public String getActitipo() {
        return actitipo;
    }

    public void setActitipo(String actitipo) {
        this.actitipo = actitipo;
    }

    public Short getActisecu() {
        return actisecu;
    }

    public void setActisecu(Short actisecu) {
        this.actisecu = actisecu;
    }

    public String getActiresp() {
        return actiresp;
    }

    public void setActiresp(String actiresp) {
        this.actiresp = actiresp;
    }

    public String getActigere() {
        return actigere;
    }

    public void setActigere(String actigere) {
        this.actigere = actigere;
    }

    public String getActicore() {
        return acticore;
    }

    public void setActicore(String acticore) {
        this.acticore = acticore;
    }

    public BigDecimal getActimapo() {
        return actimapo;
    }

    public void setActimapo(BigDecimal actimapo) {
        this.actimapo = actimapo;
    }

    public String getActisiac() {
        return actisiac;
    }

    public void setActisiac(String actisiac) {
        this.actisiac = actisiac;
    }

    public BigDecimal getActihoes() {
        return actihoes;
    }

    public void setActihoes(BigDecimal actihoes) {
        this.actihoes = actihoes;
    }

    public String getActirefe() {
        return actirefe;
    }

    public void setActirefe(String actirefe) {
        this.actirefe = actirefe;
    }

    public String getActirsql() {
        return actirsql;
    }

    public void setActirsql(String actirsql) {
        this.actirsql = actirsql;
    }

    public String getActiesac() {
        return actiesac;
    }

    public void setActiesac(String actiesac) {
        this.actiesac = actiesac;
    }

    public String getActiesfi() {
        return actiesfi;
    }

    public void setActiesfi(String actiesfi) {
        this.actiesfi = actiesfi;
    }

    public String getActireas() {
        return actireas;
    }

    public void setActireas(String actireas) {
        this.actireas = actireas;
    }

    public String getActireop() {
        return actireop;
    }

    public void setActireop(String actireop) {
        this.actireop = actireop;
    }

    public String getActiplan() {
        return actiplan;
    }

    public void setActiplan(String actiplan) {
        this.actiplan = actiplan;
    }

    public String getActideso() {
        return actideso;
    }

    public void setActideso(String actideso) {
        this.actideso = actideso;
    }

    public String getActicati() {
        return acticati;
    }

    public void setActicati(String acticati) {
        this.acticati = acticati;
    }

    public String getActigeia() {
        return actigeia;
    }

    public void setActigeia(String actigeia) {
        this.actigeia = actigeia;
    }

    public BigInteger getActivweb() {
        return activweb;
    }

    public void setActivweb(BigInteger activweb) {
        this.activweb = activweb;
    }

    public String getActienco() {
        return actienco;
    }

    public void setActienco(String actienco) {
        this.actienco = actienco;
    }

    public Formula getActiform() {
        return actiform;
    }

    public void setActiform(Formula actiform) {
        this.actiform = actiform;
    }

    public Estrcheq getActilich() {
        return actilich;
    }

    public void setActilich(Estrcheq actilich) {
        this.actilich = actilich;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (acticodi != null ? acticodi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Activida)) {
            return false;
        }
        Activida other = (Activida) object;
        if ((this.acticodi == null && other.acticodi != null) || (this.acticodi != null && !this.acticodi.equals(other.acticodi))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.smarttmt.smartmanager.entity.Activida[ acticodi=" + acticodi + " ]";
    }
    
}
